<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>表格练习</title>
</head>
<body>
<!--border 设置边框-->
    <table border="1px">
      <caption>讲师信息表</caption>
      <tr>
        <th>序号</th>
        <th>姓名</th>
        <th>科目</th>
      </tr>

      <tr>
        <td>1</td>
        <td>王伟超</td>
        <td>框架</td>
      </tr>

      <tr>
        <td>2</td>
        <td>程硕博</td>
        <td>SRE</td>
      </tr>
    </table>

<!-- colspan=n 合并列，向右合并n个单元格 n包括当前单元格 -->
<!-- rowspan=n 合并行 向下合并n个单元格 n包括当前单元格-->
<!--被合并的单元格一定要删除-->
<!-- 快捷键：table>tr>td*4 4*4表格 -->
<!-- 设置表格边框 -->
  <table border="1px">
<!--  设置表格标头  -->
    <caption>4*4表格</caption>
  <tr>
    <td>1-1</td>
    <td colspan="2">1-2</td>
    <td>1-3</td>
    <td rowspan="3">1-4</td>
  </tr>
  <tr>
    <td>2-1</td>
    <td>2-2</td>
    <td>2-3</td>
    <td>2-4</td>
  </tr>
  <tr>
    <td>3-1</td>
    <td>3-2</td>
    <td>3-3</td>
    <td>3-4</td>
  </tr>
  <tr>
    <td>4-1</td>
    <td>4-2</td>
    <td>4-3</td>
    <td>4-4</td>
  </tr>
</table>
  <hr>


<!-- style="border-collapse:相邻单元格之间的边框会被合并为一个单一的边框 -->
  <table border="1px" style="border-collapse: collapse;">
    <caption>购物车</caption>
    <tr>
      <th>商品编号</th>
      <th>商品名称</th>
      <th>商品价格</th>
    </tr>
    <tr>
      <td>1</td>
      <td>小米Air</td>
      <td>5877</td>
    </tr>

    <tr>
      <td>2</td>
      <td>华为遥遥遥遥领先</td>
      <td>8877</td>
    </tr>

    <tr>
      <td>总价</td>
      <td colspan="2">10000</td>
    </tr>
  </table>



</body>
</html>